home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 4 / 004.d81 / dos part 7 < prev    next >
Text File  |  2022-08-26  |  2KB  |  119 lines

  1.         DOS 'n' Don'ts Part 7
  2.         ---------------------
  3.  
  4.  
  5.    Last month, we covered the Scratch,
  6.  
  7. Copy, and Rename commands (among oth-
  8.  
  9. ers).  We showed how to use these com-
  10.  
  11. mands with one file at a time.  This
  12.  
  13. month, we will not introduce any new
  14.  
  15. commands, but will show how to specify
  16.  
  17. more than one file at a time with the
  18.  
  19. old commands.
  20.  
  21.  
  22.    The secret to this is to use 'wild
  23.  
  24. card' characters.  A wild card in po-
  25.  
  26. ker or other card games is a card that
  27.  
  28. can stand for any other card. The wild
  29.  
  30. card characters work the same way.
  31.  
  32.  
  33.    The wild card characters are the
  34.  
  35. question mark ('?') and the asterisk
  36.  
  37. ('*').  The '?' can stand for any one
  38.  
  39. character, and the '*' can stand for
  40.  
  41. the remainder of a file name.  For
  42.  
  43. example:  Suppose we have a disk in
  44.  
  45. our drive that has 6 files, such that
  46.  
  47. a directory listing (using DOS WEDGE)
  48.  
  49. produces:
  50.  
  51.  
  52.    0 "MY OWN DISK      " MD 2A
  53.    45   "FILE MAKER"        PRG
  54.    9    "FIRE 1"            PRG
  55.    3    "FILE 1"            SEQ
  56.    6    "FILE 2"            SEQ
  57.    5    "FILE 3"            SEQ
  58.    12   "FILLER"            PRG
  59.    3    "JUNQUE"            PRG
  60.    601 BLOCKS FREE.
  61.  
  62.  
  63.    With the above directory, the fol-
  64.  
  65. lowing filenames produce the following
  66.  
  67. matches:
  68.  
  69.  
  70.    FILENAME     MATCES
  71.    --------     ------
  72.  
  73.    '*'          all files
  74.  
  75.    'F*'         everything except
  76.                 'JUNQUE'
  77.  
  78.    'FILE *'     'FILE MAKER'
  79.                 'FILE 1'
  80.                 'FILE 2'
  81.                 'FILE 3'
  82.  
  83.    'FILE ?'     'FILE 1'
  84.                 'FILE 2'
  85.                 'FILE 3'
  86.  
  87.    'FIL???'     'FILE 1'
  88.                 'FILE 2'
  89.                 'FILE 3'
  90.                 'FILLER'
  91.  
  92.    'FI?E*'      'FILE MAKER'
  93.                 'FIRE 1'
  94.                 'FILE 1'
  95.                 'FILE 2'
  96.                 'FILE 3'
  97.  
  98.    '??????'     everything except
  99.                 'FILE MAKER'
  100.  
  101.    Note that an asterisk is the same
  102.  
  103. as enough question marks to finish out
  104.  
  105. a 16-character file name.  Contrary to
  106.  
  107. the manual, you cannot put an asterisk
  108.  
  109. anywhere except as the last character.
  110.  
  111. For example, you could NOT use the
  112.  
  113. filename 'FIL*ER' to match both 'FILE
  114.  
  115. MAKER' and 'FILLER'.
  116.  
  117.  
  118. --------- continued in PART 8 --------
  119.